This invention relates to a motion vector searching device and a motion vector searching method typically used in encoding a moving picture to search for a motion vector in an input picture. This invention also relates to a recording medium recording a program for executing the motion vector searching method.
Traditionally, use has been made of moving picture encoding for compressing a data amount of a moving picture by dividing an input moving picture into a plurality of small blocks (macro-blocks, hereinafter abbreviated to MB), searching, for each MB, for a motion vector (hereinafter abbreviated to MV) representative of a movement of an object with respect to a past or a future picture, and removing a temporal redundancy of the moving picture by the use of MV information. Each MB has typically 16×16 picture elements
Referring to FIG. 1, a related motion vector searching device will be described.
In FIG. 1, the motion vector searching device comprises a search object MB picture downloading portion 501, a search area MB picture downloading portion 502, a search object MB picture memorizing portion 503, a search area MB picture memorizing portion 504, a search position updating portion 505, an MB distance measuring portion 506, a MV candidate data updating portion 507, a MV candidate data memorizing portion 508, a search end judging portion 509, and a MV calculating portion 510.
Next referring to FIG. 2, an operation of the related motion vector searching device will be described.
The search object MB picture downloading portion 501 is supplied with a search object MB picture and makes the picture be stored in the search object MB picture memorizing portion 503 (step B1).
The search area MB picture downloading portion 502 is supplied from an outside with the information of a MV search area (for example, information representative of a area covering 48×48 picture elements in horizontal and vertical directions) for the search object MB picture, acquires all MB pictures within the MV search area, and makes these pictures be stored in the search area MB picture memorizing portion 404. After completion of this storing operation, the search area MB picture downloading portion 502 delivers a download end signal to the search position updating portion 505 (step B2).
The search position updating portion 505 is supplied with the information of the MV search area and, upon reception of the download end signal or upon reception of a search position updating request signal from the search end judging portion 509, updates a search position within the MV search area, and delivers search position information to the MB distance measuring portion 506 (step B3).
The MB distance measuring portion 506 is supplied with the search object MB picture from the search object MB picture memorizing portion 503 and with a search position MB picture among all the MB pictures stored in the search area MB picture memorizing portion 504. Then, the MB distance measuring portion 506 measures as a measured distance a distance between the search object MB picture and the search position MB picture and delivers the measured distance and the search position information to the MV candidate data updating portion 507 (step B4).
The MV candidate data updating portion 507 is supplied with the information of the minimum distance stored in the MV candidate data memorizing portion 508 and compares the minimum distance with the measured distance supplied from the MB distance measuring portion 506. If the measured distance is smaller than the minimum distance, the measured distance and the search position information are stored in the MV candidate data memorizing portion 508 as a new minimum distance and new search position information corresponding to the new minimum distance. On the other hand, if the measured distance is greater than the minimum distance, the information stored in the MV candidate data memorizing portion 508 is not updated. Thereafter, the MV candidate data updating portion 507 delivers a position search end signal to the search end judging portion 509 (step B5).
In response to the position search end signal, the search end judging portion 509 judges whether or not the search has ended for all search positions within the MV search area supplied from the outside. If the result of judgment indicates that the search for all search positions within the MV search area has not yet ended, the search end judging portion 509 delivers the search position updating request signal to the search position updating portion 505. On the other hand, if the result of judgment indicates that the search for all search positions within the MV search area has ended, the search end judging portion 509 delivers a area search end signal to the MV calculating portion 510 (step B6).
Subsequently, the steps B3, B4, B5, and B6 are repeated until the area search end signal is delivered from the search end judging portion 509 to the MV calculating portion 510.
Supplied from the search end judging portion 509 with the area search end signal, the MV calculating portion 510 acquires the search position information stored in the MV candidate data memorizing portion 508 and outputs the search position information as MV information (step B7).
The related motion vector searching device is disclosed, for example, in Japanese Unexamined Patent Publication (JP-A) No. H10-341440.
However, the above-mentioned motion vector searching device is disadvantageous in the following respects.
As a first problem, it is impossible to restrict the search area in the MV searching operation in moving picture encoding. This is because no operation of learning the tendency of past movement of the picture element is carried out and, therefore, a direction of future movement of the picture element can not be predicted.
As a second problem, the MV searching operation in the moving picture encoding requires an enormously large processing amount. This is because the direction of the movement of the picture element can not be predicted at all and, therefore, the motion vector search must be carried out for all picture elements within the search area.